package com.esxy.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.util.Date;

@Data  //简化实体类自动注入

public class TUser {

    @TableId(type = IdType.AUTO)

    private Long id;

    private String userName;

    private Integer age;

    private String email;

    private String password;

    private String sex;

    @TableField(fill = FieldFill.INSERT)  //自动填充

    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)

    private Date updateTime;

    @TableField(fill = FieldFill.INSERT)
    //逻辑删除的注解
    @TableLogic
    private Integer isDelete;

    @TableField(fill = FieldFill.INSERT)
    @Version
    private Integer version; //版本号
}
